(function (a) {
    if (!a.browser) {
        a.browser = {};
        a.browser.mozilla = !1;
        a.browser.webkit = !1;
        a.browser.opera = !1;
        a.browser.msie = !1;
        var b = navigator.userAgent;
        a.browser.name = navigator.appName;
        a.browser.fullVersion = "" + parseFloat(navigator.appVersion);
        a.browser.majorVersion = parseInt(navigator.appVersion, 10);
        var f, c; - 1 != (c = b.indexOf("Opera")) ? (a.browser.opera = !0, a.browser.name = "Opera", a.browser.fullVersion = b.substring(c + 6), -1 != (c = b.indexOf("Version")) && (a.browser.fullVersion = b.substring(c + 8))) : -1 != (c = b.indexOf("MSIE")) ? (a.browser.msie = !0, a.browser.name = "Microsoft Internet Explorer", a.browser.fullVersion = b.substring(c + 5)) : -1 != (c = b.indexOf("Chrome")) ? (a.browser.webkit = !0, a.browser.name = "Chrome", a.browser.fullVersion = b.substring(c + 7)) : -1 != (c = b.indexOf("Safari")) ? (a.browser.webkit = !0, a.browser.name = "Safari", a.browser.fullVersion = b.substring(c + 7), -1 != (c = b.indexOf("Version")) && (a.browser.fullVersion = b.substring(c + 8))) : -1 != (c = b.indexOf("Firefox")) ? (a.browser.mozilla = !0, a.browser.name = "Firefox", a.browser.fullVersion = b.substring(c + 8)) : (f = b.lastIndexOf(" ") + 1) < (c = b.lastIndexOf("/")) && (a.browser.name = b.substring(f, c), a.browser.fullVersion = b.substring(c + 1), a.browser.name.toLowerCase() == a.browser.name.toUpperCase() && (a.browser.name = navigator.appName)); - 1 != (b = a.browser.fullVersion.indexOf(";")) && (a.browser.fullVersion = a.browser.fullVersion.substring(0, b)); - 1 != (b = a.browser.fullVersion.indexOf(" ")) && (a.browser.fullVersion = a.browser.fullVersion.substring(0, b));
        a.browser.majorVersion = parseInt("" + a.browser.fullVersion, 10);
        isNaN(a.browser.majorVersion) && (a.browser.fullVersion = "" + parseFloat(navigator.appVersion), a.browser.majorVersion = parseInt(navigator.appVersion, 10));
        a.browser.version = a.browser.majorVersion
    }
})(jQuery);
(function (a) {
    var b;
    a.fn.jqprint = function (f) {
        b = a.extend({}, a.fn.jqprint.defaults, f);
        f = this instanceof jQuery ? this : a(this);
        if (b.operaSupport && a.browser.opera) {
            var c = window.open("", "jqPrint-preview");
            c.document.open();
            var d = c.document
        } else {
            var e = a("<iframe  />");
            b.debug || e.css({
                position: "absolute",
                width: "0px",
                height: "0px",
                left: "-600px",
                top: "-600px"
            });
            e.appendTo("body");
            d = e[0].contentWindow.document
        }
        d.write("<title></title><style>@page{size: auto;margin: 0mm;}html{background-color: #FFFFFF;margin: 0px;}body{border: solid 1px blue;margin: 10mm 15mm 10mm 15mm;}</style >");
        b.importCSS && (0 < a("link[media=print]").length ? a("link[media=print]").each(function () {
            d.write("<link type='text/css' rel='stylesheet' href='" + a(this).attr("href") + "' media='print' />")
        }) : a("link").each(function () {
            d.write("<link type='text/css' rel='stylesheet' href='" + a(this).attr("href") + "' />")
        }), d.write("<style>" + a("style").html() + "</style>"));
        b.printContainer ? d.write(f.outer()) : f.each(function () {
            d.write(a(this).html())
        });
        d.close();
        (b.operaSupport && a.browser.opera ? c : e[0].contentWindow).focus();
        setTimeout(function () {
            (b.operaSupport && a.browser.opera ? c : e[0].contentWindow).print();
            c && c.close()
        }, 1E3)
    };
    a.fn.jqprint.defaults = {
        debug: !1,
        importCSS: !0,
        printContainer: !0,
        operaSupport: !0
    };
    jQuery.fn.outer = function () {
        for (var b = this.clone(), c = a(this), b = a(b), d = 0; 100 > d; d++) {
            var e = c.parent().prop("nodeName").toLowerCase(),
                b = a("<" + e + "></" + e + ">").attr("style", c.parent().attr("style")).addClass(c.parent().attr("class")).html(b.clone());
            if ("body" == e) break;
            c = c.parent()
        }
        return a(a("<div></div>").html(b.clone())).html()
    }

    // 力软信息扩展
    a.fn.jqprintEx = function (f) {
        b = a.extend({}, a.fn.jqprint.defaults, f);
        f = this instanceof jQuery ? this : a(this);
        if (b.operaSupport && a.browser.opera) {
            var c = window.open("", "jqPrint-preview");
            c.document.open();
            var d = c.document
        } else {
            var e = a("<iframe  />");
            b.debug || e.css({
                position: "absolute",
                width: "0px",
                height: "0px",
                left: "-600px",
                top: "-600px"
            });
            e.appendTo("body");
            d = e[0].contentWindow.document
        }
        d.write("<title></title><style>@page{size: auto;margin: 0mm;}html{background-color: #FFFFFF;margin: 0px;}body{border: solid 1px blue;margin: 10mm 15mm 10mm 15mm;}</style >");

        b.importCSS && (0 < a("link[media=print]").length ? a("link[media=print]").each(function () {
            d.write("<link type='text/css' rel='stylesheet' href='" + a(this).attr("href") + "' media='print' />")
        }) : a("link").each(function () {
            d.write("<link type='text/css' rel='stylesheet' href='" + a(this).attr("href") + "' />")
            }),
            d.write("<style>" + a("style").html() + "</style>"));
        b.printContainer ? d.write(f.outerEx()) : f.each(function () {
            d.write(a(this).html())
        });
        d.close();
        (b.operaSupport && a.browser.opera ? c : e[0].contentWindow).focus();
        setTimeout(function () {
            (b.operaSupport && a.browser.opera ? c : e[0].contentWindow).print();
            c && c.close()
        }, 1E3)
    };

    jQuery.fn.outerEx = function () {
        for (var b = this.clone(), c = a(this), b = a(b), d = 0; 100 > d; d++) {
            var e = c.parent().prop("nodeName").toLowerCase(),
                b = a("<" + e + "></" + e + ">").attr("style", c.parent().attr("style")).addClass(c.parent().attr("class")).html(b.clone());
            if ("body" == e) break;
            c = c.parent()
        }
        return a(a("<div></div>").html(b.clone())).html()
    }


})(jQuery);